package com.frank.loadinglibrary.special.cool.letter;


import ohos.agp.render.Canvas;

/**
 * Created by yanxing on 16/2/18.
 */
public abstract class BaseLetter {

    protected float mCurX;
    protected float mCurY;
    protected int mDuration = 2000;
    protected AnimationCallBack animationCallBack;
    private float hsX, hsY;

    protected BaseLetter(float x, float y) {
        mCurX = x;
        mCurY = y;
        hsX = x;
        hsY = y;
    }

    public void startAnim() {

    }

    public void drawSelf(Canvas canvas) {

    }

    public void reset() {
        mCurX = hsX;
        mCurY = hsY;
    }

    public void setAnimationCallBack(AnimationCallBack animatorStateListen) {
        this.animationCallBack = animatorStateListen;
    }

    public interface AnimationCallBack {
        /**
         * 字母动画结束
         */
        void onLetterAnimatorEnd();
    }
}
